<template>
  <!-- 统计和清空 -->
  <footer class="footer">
    <!-- 统计 -->
    <span class="todo-count"
      >合 计:<strong> {{ num }} </strong></span
    >
    <!-- 清空 -->
    <button class="clear-completed" @click="$emit('clear-all')">清空任务</button>
  </footer>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {};
  },
  methods: {},
  computed: {
    num() {
      return this.list.length;
    },
  },
};
</script>

<style scoped></style>
